<?php

namespace app\validate\home;

use app\common\validate\BaseValidate;

/**
 * Class Validate
 * https://www.kancloud.cn/manual/thinkphp6_0/1037624
 * @package app\daily\validate
 */
class Member extends BaseValidate
{
    //定义验证规则
    protected $rule = [
        'identify|身份标识' => 'require|number',
        'phone|手机号码' => 'mobile',
        'code|验证码' => '',
        'type|头像类型' => 'number'
    ];

    //定义验证场景要与方法名相同走自动验证
    protected $scene = [
        'info' => ['type'],
        'change' => ['identify'],
        'bindPhone' => ['phone', 'code'],
        'change_avatar' => ['type']
    ];

}
